package com.youtills.resource;

/**
 * TODO - !!!doc me!!!
 *
 * @author ravi.chiluveru
 * @since 23.0 (10/6/14)
 */
public abstract class BaseChildResource extends BaseResource implements ChildResource{

    private final ResourceAttributeValue<Long> parentResourceType;
    private final ResourceAttributeValue<Long> parentResourceId;

    protected BaseChildResource() {
        super();

        this.parentResourceType = new ResourceAttributeValue<Long>(this, CommonAttribute.parentResourceType);
        this.parentResourceId = new ResourceAttributeValue<Long>(this, CommonAttribute.parentResourceId);

    }

    public Long getParentResourceType() {
        return parentResourceType.getValue();
    }

    public void setParentResourceType(Long parentResourceType) {
        this.parentResourceType.setValue(parentResourceType);
    }

    public Long getParentResourceId() {
        return parentResourceId.getValue();
    }

    public void setParentResourceId(Long parentResourceId) {
        this.parentResourceId.setValue(parentResourceId);
    }

    @Override
    public Resource getParentResource() {
        return null;
    }
}
